package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xmy.cultivate.entity.CourseType;
import com.xmy.cultivate.entity.StoreGoods;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.StoreGoodsBatch;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 物次库存 服务类
 * </p>
 *
 * @author hpiggy
 * @since 2024-07-30
 */
public interface IStoreGoodsService extends IService<StoreGoods> {


    IPage<CourseType> getClassTypeList(IPage<?> page, Integer yearPart, Integer quarterNum, Long schoolId, Long subjectsId, Integer yearClassId, Long classTypeId, Long goodsTypeId);

    Integer getMaxLessonNum(Integer yearPart, Integer quarterNum, Long schoolId, Long subjectsId, Integer yearClassId, Long classTypeId, Long goodsTypeId);

    List<StoreGoods> getStoreGoodsList(Integer yearPart, Integer quarterNum, Long schoolId, Long subjectsId, Integer yearClassId, Long classTypeId, Long goodsTypeId, Integer lessonType);

    @Transactional
    boolean addStoreGoods(StoreGoods storeGoods);

    @Transactional
    boolean addStoreGoodsBatch(StoreGoodsBatch storeGoodsBatch);

    @Transactional
    boolean affirmAddOrder(StoreGoods storeGoods);

    @Transactional
    boolean affirmAddStoreGoods(StoreGoods storeGoods);

    List<Map<String,Object>> needOrderExport(Integer yearPart, Integer quarterNum, Long schoolId, Integer lessonType, Long subjectsId, Integer yearClassId, Long classTypeId, Long goodsTypeId);
}
